import javax.sound.midi.Soundbank;
import java.util.SortedMap;

public class Test2 {
    public static void main(String[] args) {
        MainBoard mb = new MainBoard();

        NetworkCard nc = new NetworkCard();

        SoundCard sc = new SoundCard();

        mb.usePCICard(nc);
        mb.usePCICard(sc);
    }
}

interface PCI {
    public abstract void start();

    public abstract void stop();
}

class NetworkCard implements PCI {

    @Override
    public void start() {
        System.out.println("sending data...");
    }

    @Override
    public void stop() {
        System.out.println("network stop");
    }
}

class SoundCard implements PCI {

    @Override
    public void start() {
        System.out.println("dudu...");
    }

    @Override
    public void stop() {
        System.out.println("sound stop...");
    }
}

class MainBoard {
    public void usePCICard(PCI p) {
        p.start();
        p.stop();
    }
}